import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import {initMenu} from "./utils/menu";


Vue.use(ElementUI);

Vue.config.productionTip = false

router.beforeEach((to,from,next)=> {
  if (window.sessionStorage.getItem('tokenStr')){
    initMenu(router,store);
    next();
  }else {
      next();
  }
})




new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
